package com.kaili.basic.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.kaili.basic.pojo.dto.MdmAlarmPageListDto;
import com.kaili.basic.pojo.entity.MdmAlarmEntity;
import com.kaili.basic.pojo.vo.MdmAlarmEmailVo;
import com.kaili.basic.pojo.vo.MdmAlarmPageListVo;
import com.kaili.basic.pojo.vo.MdmAlarmPhoneVo;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;

/**
 * @Desc:   告警Mapper
 * @author: jianfeng
 * @Time: 2019/8/2 14:28
 * @Copyright: © 2018 杭州凯立通信有限公司 版权所有
 * @Warning: 本内容仅限于公司内部传阅, 禁止外泄或用于其它商业目的
 */
@Mapper
public interface AlarmMapper extends BaseMapper<MdmAlarmEntity> {

    /**
    * @Desc:  分页查询告警信息
    * @author: jianfeng
    * @Time: 2019/8/2 15:45
    * @param page
    * @param alarmPageListDto
    * @return java.util.List<com.kaili.basic.pojo.vo.MdmAlarmPageListVo>
    */
    List<MdmAlarmPageListVo> queryPageList(Page<MdmAlarmPageListVo> page, MdmAlarmPageListDto alarmPageListDto);

    /**
    * @Desc:  导出
    * @author: jianfeng
    * @Time: 2019/8/2 15:47
    * @param alarmPageListDto
    * @return java.util.List<com.kaili.basic.pojo.vo.MdmAlarmPageListVo>
    */
    List<MdmAlarmPageListVo> queryPageList(MdmAlarmPageListDto alarmPageListDto);

    /**
     * @Desc:  查询单个设备的单项最新告警记录
     * @author: shenliqiang
     * @Time: 2019/8/2 15:47
     * @param map
     * @return java.util.List<com.kaili.basic.pojo.vo.MdmAlarmPageListVo>
     */
    MdmAlarmEntity queryLatestRecordByDeviceId(Map map);

    /**
    * @Desc:  查询单个设备的所有项最新告警记录
    * @author: shenliqiang
    * @Time: 2019/8/7 15:53
    * @param deviceId
    * @return java.util.List<com.kaili.basic.pojo.entity.MdmAlarmEntity>
    */
    List<MdmAlarmEntity> queryLatestRecordsByDeviceId(Integer deviceId);

    /**
    * @Desc:  告警信息发送邮件
    * @author: jianfeng
    * @Time: 2019/8/8 8:59
    *
    * @return java.util.List<com.kaili.basic.pojo.vo.MdmAlarmPageListVo>
    */
    List<MdmAlarmEmailVo> queryEmailList();

    /**
    * @Desc:  告警信息发送短信
    * @author: jianfeng
    * @Time: 2019/8/9 11:24
    *
    * @return java.util.List<com.kaili.basic.pojo.vo.MdmAlarmPhoneVo>
    */
    List<MdmAlarmPhoneVo> queryPhoneList();

    /**
    * @Desc:  批量更新邮件是否发送字段
    * @author: jianfeng
    * @Time: 2019/8/8 14:39
    * @param ids
    * @return void
    */
    void batchUpdateEmailByIds(Integer[] ids);

    /**
    * @Desc:  批量更新短信是否发送字段
    * @author: jianfeng
    * @Time: 2019/8/9 11:25
    * @param ids
    * @return void
    */
    void batchUpdatePhoneByIds(Integer[] ids);
}
